<?xml version="1.0" encoding="ISO-8859-1" ?>
<%@ page import="domain.ContactGroup" %>
<%@ taglib prefix="html" uri="http://struts.apache.org/tags-html"%>
<%@ taglib prefix="bean" uri="http://struts.apache.org/tags-bean"%>
<%@ taglib prefix="nested" uri="http://struts.apache.org/tags-nested"%>
<jsp:include page="topHtml.jsp" />	
		<% Object[] groups = (Object[])request.getAttribute("groups"); %>
		<html:form action="/CreateContact">
		<div class="errors" >
			<html:errors />
		</div>
			<label for="firstName"><bean:message key="contact.firstname" />:</label><html:text property="firstName" size="25" /> <br />
			<label for="lastName"><bean:message key="contact.lastname" />:</label> <html:text property="lastName" size="30" /> <br />
			<label for="email"><bean:message key="contact.email" />:</label><html:text property="email" size="25" /> <br />
			<label for="street"><bean:message key="address.street" />:</label> <html:text property="street" size="25" /> <br />
			<label for="zip"><bean:message key="address.zip" />:</label><html:text property="zip" size="30" /> <br />
			<label for="city"><bean:message key="address.city" />: </label> <html:text property="city" size="25" /> <br />
			<label for="country"><bean:message key="address.country" />: </label><html:text property="country" size="25" /> <br /> 
			<bean:message key="contact.addphone.explanation" /> <br />
		    <label for="phoneKind"><bean:message key="phone.kind" />: </label>
		    <select name="phoneKind">
		    	<option value="Home">Home</option>
		    	<option value="Mobile">Mobile</option>
		    	<option value="Office">Office</option>
		    	<option value="Other">Other</option>
		    </select><br />
			<label for="phoneNumber"><bean:message key="phone.number" />: </label><html:text property="phoneNumber" size="12" /> <br />
			<label for="group">Group: </label>
			<select name="groupIds" multiple="multiple">			
		<% for( Object obj : groups) { %>
				<% ContactGroup cg = (ContactGroup) obj; %>
				<option value="<%= cg.getGroupId() %>"><%= cg.getGroupName() %></option>
			<% } %>
			</select> <br /><br />
			<input type="checkbox" name="society" /><bean:message key="contact.society" /> <br />
			<label for="numSiret"><bean:message key="contact.numSiret" />: </label><html:text property="numSiret" size="25" />
			 <br /><br />
			<html:submit styleClass="button"><bean:message key="contact.add.link" /></html:submit>
			<html:reset styleClass="button"><bean:message key="reset.link" /></html:reset>
		</html:form>
<jsp:include page="bottomHtml.jsp" />	